package com.zengfa.task.client.model;

import java.lang.reflect.Method;

import com.zengfa.task.api.enums.RunType;

import lombok.Data;

/**
 * 流程节点定义
 * @author 曾法
 * @since 2025-01-08 15:31:38
 */
@Data
public class FlowNodeDefine {

	private String group;
	/**
	 * 流程节点标识
	 */
	private String code;
	
	private Integer order;
	
	/**
	 * 执行服务，spring的bean
	 */
	private Object service;
	
	/**
	 * 执行方法
	 */
	private Method method;
	
	private RunType runType;
	
	private String monitorName;
	
	private FlowNodeMonitorDefine flowNodeMonitorDefine;
	
	/**
	 * 流程节点描述
	 */
	private String desc;

	public FlowNodeDefine() {
		
	}
	
	public FlowNodeDefine(String code, Object service, Method method, String desc) {
		super();
		this.code = code;
		this.service = service;
		this.method = method;
		this.desc = desc;
	}

	@Override
	public String toString() {
		return "FlowNodeDefine [code=" + code + ", server=" + service + ", method=" + method + ", desc=" + desc + "]";
	}
	
}
